<template>
  <div class="container-fluid">
    <div class="form-row">
      <div class="col-12">
        <div class="slidercaptcha card">
          <div class="card-header">
            <span>请完成安全验证!</span>
          </div>
          <div class="card-body">
            <div id="captcha"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {};
    },
    methods: {},
    mounted() {
      import('./disk/longbow.slidercaptcha.js').then(res => {
        var captcha = sliderCaptcha({
          id: 'captcha',
          //setSrc: function() {
            //return (
              //'http://imgs.blazor.zone/images/Pic' +
              //Math.round(Math.random() * 136) +
              //'.jpg'
            //);
          //},
          onSuccess: function() {
            //成功事件
            var handler = setTimeout(function() {
              window.clearTimeout(handler);
              captcha.reset();
            }, 500);
          },
        });
      });
    },
  };
</script>
<style>
  @import './lib/font-awesome/css/font-awesome.min.css';
  @import './disk/slidercaptcha.min.css';
</style>
